package com.zy.uml;

import java.util.Arrays;

/**
 * @Author Gong
 * @Description 鸟
 * @dATE 2021/11/20 21:36
 **/
public abstract class Bird extends Animal{
    //特性
    private String feather;//羽毛
    private Wing[] wings;//鸟有2个翅膀
    Bird(String feather,Wing[] wings){
        this.feather=feather;
        this.wings=wings;
    }
    //操作
    public abstract void layEggs();//下蛋是一个抽象方法

    @Override
    public String toString() {
        return super.toString()+"Bird{" +
                "feather='" + feather + '\'' +
                ", wings=" + Arrays.toString(wings) +
                '}';
    }
}
